 // 轮播图
 const banner = document.querySelector('.banner-this');
 let active = document.querySelector('.active');
 const adBtn = document.querySelector('.adBtn');
 let index = 0;
 let bannerTimer = timer();
 function changeBG(){
         index++;
         if(index==banner.children.length)index=0;
         banner.style.transform = `translateX(${index * -604}px)`;
         banner.style.transition = `all 0.3s`;
         active.classList.remove('active');
         adBtn.children[index].classList.add('active');
         active = adBtn.children[index];
 }
 function timer(){
     return setInterval(changeBG,3000)
 }
 adBtn.addEventListener('mouseover',function(e){
     if(e.target.tagName=='A'){
         let a = e.target;
         clearInterval(bannerTimer);
         index = a.dataset.index-1;
         changeBG();
         bannerTimer = timer();
     }
 })